﻿Public Class FrmPrincipal

    Private Sub AltGrpToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AltGrpToolStripMenuItem.Click
        FrmGrupos.ChkGruposHab.Checked = True
        FrmGrupos.ChkGruposHab.Enabled = False
        FrmGrupos.Show()
    End Sub

    Private Sub ModGrpToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ModGrpToolStripMenuItem.Click
        FrmGrupos.Show()
    End Sub

    Private Sub AltAsiToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AltAsiToolStripMenuItem1.Click
        FrmAsignatura.ChkAsignaturaHab.Checked = True
        FrmAsignatura.ChkAsignaturaHab.Enabled = False
        FrmAsignatura.Show()
    End Sub

    Private Sub ModAsiToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ModAsiToolStripMenuItem.Click
        FrmAsignatura.Show()
    End Sub

    Private Sub AltSalToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AltSalToolStripMenuItem2.Click
        FrmSalon.ChkSalonHabilitado.Checked = True
        FrmSalon.ChkSalonHabilitado.Enabled = False
        FrmSalon.Show()
    End Sub

    Private Sub ManualToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ManualToolStripMenuItem.Click
        Frm_Grilla.Show()
    End Sub

    Private Sub BtnCerrarSesion_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If MsgBox("¿Seguro que desea cerrar la sesion?", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then
            FrmLogin.Show()
            Me.Close()
        End If
    End Sub

    Private Sub AltTurStripMenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AltTurStripMenuItem3.Click
        FrmTurno.Show()
    End Sub

    Private Sub AltaToolStripMenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AltaToolStripMenuItem4.Click
        FrmDocente.Show()
    End Sub

    Private Sub ModDocToolStripMenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ModDocToolStripMenuItem3.Click
        LstDocentes.Visible = True
        FrmDocente.Show()
    End Sub

    Private Sub AutomáticaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AutomáticaToolStripMenuItem.Click
        MsgBox("Funcionalidad pendiente", MsgBoxStyle.Information)
        Frm_Grilla.Show()
    End Sub

    Private Sub ValidacionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ValidacionToolStripMenuItem.Click
        MsgBox("Funcion incompleta, ejemplo ilustrativo", MsgBoxStyle.Information)
        FrmValidacion.Show()
    End Sub

    Private Sub ConsultaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Me.LstDocentes.Columns.Add("Asignatura", 200)
        Me.LstDocentes.Width += 200
        Me.LstDocentes.Show()
    End Sub

    Private Sub CerrarSesionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CerrarSesionToolStripMenuItem.Click
        If MsgBox("¿Seguro que desea cerrar la sesion?", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then
            FrmLogin.Show()
            Me.Close()
        End If
    End Sub

    Private Sub FrmPrincipal_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        If MsgBox("     ¿Salir?", MsgBoxStyle.OkCancel) = MsgBoxResult.Cancel Then
            e.Cancel = True
        End If
    End Sub

    Private Sub ModSalToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ModSalToolStripMenuItem1.Click
        FrmSalon.Show()
    End Sub

    Private Sub FrmPrincipal_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.GotFocus
        Me.MenuStrip1.Enabled = True
    End Sub

    Private Sub FrmPrincipal_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LostFocus
        Me.MenuStrip1.Enabled = False
    End Sub

End Class